export enum ClickMode {
  Normal= 'Normal',
  Push= 'Push'
}

export class AuthUser {
    uin: string;
    password: string;

    static from(user: User, password: string): AuthUser {
                const au: AuthUser = {
                    uin: user.uin,
                    password,
                };
                return au;
          }
}

export enum UserType {
    Admin = 0,
    Member = 1,
    Teacher = 2,
    Employee = 3,
    Enterprise = 4
}

export class User {
    uin: string;
    name: string;
    nickName: string;
    sortName: string;
    avatar: string;
    password: string;
    userType: UserType;
}

enum ONLINE {
    ON = 'ON',
    OFF = 'OFF',
}

enum ClassMode {
    sc = 'sc',
    oto = 'oto'
}

export class ClassModeO {
  name: string;
  text: string;
}

export enum BookedResult {
    create = 'create',
            booking = 'booking',
            booked = 'booked',
            havingClass = 'havingClass' ,
            completed= 'completed'  ,          // 上课中的课程才能完成
            cancelled= 'cancelled'  ,
}

export class BookedResultO {
    text: string;
    name: BookedResult;
}

export class Booked {
    id: number;
    sn: string;
    beginTime: number;
    endTime: number;
    online: ONLINE;
    classMode: ClassModeO;
    category: any;
    result: BookedResultO;
    students: any;
    statuses: any[];
    extra: any;
    rct: any;
    ct: any;
    lesson: any;
    material: any;
    unit: any;
    level: any;
}

export class BookedWrapper {
    current: Booked;
    next: Booked;
    delay: number;
}

export class OPosition {
    x: number;
    y: number;
    z? = 0;
}

export class OSize {
    width: number;
    height: number;
}

export class Participant {
    participantId: string;
}

export class Participants {
    participantIds: string[];
}

export enum DB_NAME {
    DRAW = 'DRAW'
}

export class Settings{
    voiceValue :number = 80;
    themeColor: string = "#535353";
}